package com.net.lnk.batch.bank.batch;

import java.util.List;

import org.springframework.batch.item.ItemWriter;
import org.springframework.beans.factory.annotation.Autowired;

import com.net.lnk.batch.bank.dao.BankcardMapper;
import com.net.lnk.batch.bank.model.BankcardModel;

public class BankcardItemWriter implements ItemWriter<BankcardModel> {

	@Autowired
	private BankcardMapper bankcardMapper;

	@Override
	public void write(List<? extends BankcardModel> items) throws Exception {
		for (BankcardModel item : items) {

			bankcardMapper.insertSelective(item);
		}
	}

}
